frappe.ui.form.on('Mode of Payment', {
	refresh(frm) {
		// your code here
		frm.set_query("default_account", "accounts", function (doc, cdt, cdn) {
			let d = locals[cdt][cdn];
			return {
				filters: [
					["Account", "account_type", "in", "Bank, Cash, Receivable,Temporary"],
					["Account", "is_group", "=", 0],
					["Account", "company", "=", d.company],
				],
			};
		});
	}
})